local app = require 'app'
local game = app.game.running
local data_map = game.require 'pokers.poker_data_map'

local poker_data = {}

function poker_data.new(serverValue)
    local self = {}
    setmetatable(self, {__index = poker_data})

    if serverValue <= 0 then
        serverValue = 0
    end

    self.client_type = data_map[serverValue][1]
    self.client_value = data_map[serverValue][2]
    self.client_weight = data_map[serverValue][3]
    self.server_value = serverValue

    return self
end

function poker_data:tostring()
    return string.format("client_value:%s client_type%s server_value:%s", self.client_value, self.client_type, self.server_value);
end

return poker_data
